<?php
class Zend_View_Helper_Category {

	public $view;

	public function category($category) {
		if($category->parent == 0){
			$html  = '<li class="style' . $category->id . '">
			<a href="/category/index/id/' . $category->id . '" class="parent">' . $category->name . '</a>';
		} else { 
			$html  = '<li>
			<a href="/category/index/id/' . $category->id . '">' . $category->name . '</a>';
		}
		$html  .= '
				   <a href="/category/delete/id/' . $category->id .'">Удалить</a>
				   <a href="/category/edit/id/' . $category->id .'">Ред</a>
				   <a href="/category/index/id/' . $category->id .'">войти</a>
				   </li>';
		return $html; 
	}
	public function setView(Zend_View_Interface $view) {
		$this->view = $view;
	}
}
